package com.jiaoyou.baojian.adapter;

import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jiaoyou.baojian.R;
import com.jiaoyou.baojian.entity.UserEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by DemonZYM on 17/4/13.
 */

public class MineAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    private List<Integer> icon_list = new ArrayList<>();

    public MineAdapter() {
        super(R.layout.item_mines);
    }

    public void addIcon(int res){
        icon_list.add(res);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        helper.setText(R.id.text, item);
        int position = helper.getLayoutPosition();
        ((TextView) helper.getView(R.id.text)).setCompoundDrawablesWithIntrinsicBounds(0, icon_list.get(position), 0, 0);
    }
}
